package com.ruoyi.system.domain;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.ruoyi.common.core.domain.BaseEntity;
import com.ruoyi.common.valid.ValidInsertGroup;
import com.ruoyi.common.valid.ValidUpdateGroup;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

/**
 * @Description TODO
 * @ClassName BsShouye
 * @Author kenn
 * @Version 1.0.0
 * @Date 2023年11月23日 11:26:00
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@Builder
@TableName("bs_shouye")
@ApiModel(value = "首页展示-图片配置", parent = BaseEntity.class)
public class BsShouye extends BaseEntity {

    @TableId
    @ApiModelProperty("主键id")
    @NotNull(message = "主键id不能为空", groups = {ValidUpdateGroup.class})
    private Long id;

    @ApiModelProperty("图片类型 关联字典表shouye_img_type")
    @NotBlank(message = "图片类型不能为空", groups = {ValidInsertGroup.class, ValidUpdateGroup.class})
    private String imgType;

    @ApiModelProperty("景区id 非必填")
    private Long jingquId;

    @ApiModelProperty("状态 0：停用；1：启用")
    @NotBlank(message = "状态不能为空", groups = {ValidInsertGroup.class, ValidUpdateGroup.class})
    private String imgStatus;

    @ApiModelProperty("图片地址")
    @NotBlank(message = "图片地址不能为空", groups = {ValidInsertGroup.class, ValidUpdateGroup.class})
    private String imgUrl;

    @ApiModelProperty("排序字段 排序时需传")
    private Integer sort;

    @TableField(exist = false)
    @ApiModelProperty("图片类型 传参时不需要此字段")
    private String imgTypeName;

}
